package com.xiaoyung.easyis.app.demo;

import java.io.IOException;

import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.fastjson2.JSONObject;
import com.xiaoyung.easyis.app.demo.controller.PersonController;
import com.xiaoyung.easyisapisdk.common.util.JSONUtils;

public class App {
	private static Logger logger = LoggerFactory.getLogger(PersonController.class);

	public JSONObject getMetaInfo() {
		JSONObject meta = null;
		try {
			String content = IOUtils.toString(App.class.getResourceAsStream("/meta.conf"), "UTF-8");
			meta = (JSONObject)JSONUtils.jsonStringToObject(content);
		} catch (IOException e) {
			throw new RuntimeException("App.getMetaInfo 获取元信息异常," + e.getMessage());
		}
		return meta;
	}

	public static void main(String[] args) {
		JSONObject meta = new App().getMetaInfo();
		//System.out.println(meta);
		logger.debug("getMetaInfo {}",meta);
		
	}
}
